Stepping Lazy Programs

نویسندگان

  • Stephen Chang
  • John Clements
  • Eli Barzilay
  • Matthias Felleisen
چکیده

Debugging lazy functional programs poses serious challenges. In support of the “stop, examine, and resume” debugging style of imperative languages, some debugging tools abandon lazy evaluation. Other debuggers preserve laziness but present it in a way that may confuse programmers because the focus of evaluation jumps around in a seemingly random manner. In this paper, we introduce a supplemental tool, the algebraic program stepper. An algebraic stepper shows computation as a mathematical calculation. Algebraic stepping could be particularly useful for novice programmers or programmers new to lazy programming. Mathematically speaking, an algebraic stepper renders computation as the standard rewriting sequence of a lazy λcalculus. Our novel lazy semantics introduces lazy evaluation as a form of parallel program rewriting. It represents a compromise between Launchbury’s store-based semantics and a simple, axiomatic description of lazy computation as sharing-via-parameters, à la Ariola et al. Finally, we prove that the stepper’s run-time machinery correctly reconstructs the standard rewriting sequence.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Run-time debugging for functional logic languages

This thesis describes the design, implementation and use of a run-time debugging tool for understanding the lazy semantics and locating failures in the functional logic language Curry. We provide a means for programmers to step in the evaluation order of program expressions at a source code level. Every expression evaluated is detected by a program coverage in a layout of the source code. Its r...

متن کامل

Debugging Haskell by Observing Intermediate Data Structures

Haskell has long needed a debugger. Although there has been much research into the topic of debugging lazy functional programs, no robust tool has yet come from the Haskell community that can help debug full Haskell until now. This paper describes a portable debugger for full Haskell, building only on commonly implemented extensions. It is based on the concept of observation of intermediate dat...

متن کامل

Lazy-CSeq: A Lazy Sequentialization Tool for C - (Competition Contribution)

We describe a version of the lazy sequentialization schema by La Torre, Madhusudan, and Parlato that is optimized for bounded programs, and avoids the re-computation of the local state of each process at each context switch. Lazy-CSeq implements this sequentialization schema for sequentially consistent C programs using POSIX threads. Experiments show that it is very competitive.

متن کامل

CSC2108 - Project Report Lazy Abstraction on Software Model Checking

This paper is a survey of the BLAST, which is a software model checker for C programs developed at Berkeley. Based on the popular abstract-check-refine paradigm, the concept of lazy abstraction is introduced in the BLAST project. Lazy abstraction is a new idea for the optimization of the abstract-check-refine loop. We present the lazy abstraction concept and the implementation framework of BLAS...

متن کامل

Translating functional programs to GCLA *

This paper presents an attempt to do lazy evaluation in GCLA by translating functional programs into GCLA definitions and evaluating these using a proper procedural part. The resulting GCLA programs are described with some detail to illuminate different aspects of GCLA programming.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1108.4706  شماره 

صفحات  -

تاریخ انتشار 2011